/*
Daniel Corstange	
Proposal title: American Responses to the Syrian Refugee Crisis


HYPOTHESES

Stated-Hyp1: Different frames about the Syrian war will affect complexity of narratives of conflict.

	Test-Hyp1: Character counts in responses will vary across control vs. democrat/dictator condition.
	Test-Hyp2: Character counts in responses will vary across control vs. moderate/extremist condition.
	Test-Hyp3: Character counts in responses will vary across control vs. sunni/shiite condition.

	Test-Hyp4: Character counts in responses will vary across democrat/dictator vs. moderate/extremist condition.
	Test-Hyp5: Character counts in responses will vary across democrat/dictator vs. sunni/shiite condition.		
	Test-Hyp6: Character counts in responses will vary across moderate/extremist vs. sunni/shiite condition.			

	Test-Hyp7: Character counts in responses will vary across control vs. democrat/dictator + moderate/extremist condition.
	Test-Hyp8: Character counts in responses will vary across control vs. democrat/dictator + sunni/shiite condition.		
	Test-Hyp9: Character counts in responses will vary across control vs. moderate/extremist + sunni/shiite condition.	

	Test-Hyp10: Character counts in responses will vary across control vs. triple frame.		
	
Stated-Hyp2: Different frames about the Syrian war will affect attentiveness to narratives of conflict.

	Test-Hyp11: Response time for narrative question will vary across control vs. democrat/dictator condition.
	Test-Hyp12: Response time for narrative question will vary across control vs. moderate/extremist condition.
	Test-Hyp13: Response time for narrative question will vary across control vs. sunni/shiite condition.

	Test-Hyp14: Response time for narrative question will vary across democrat/dictator vs. moderate/extremist condition.
	Test-Hyp15: Response time for narrative question will vary across democrat/dictator vs. sunni/shiite condition.		
	Test-Hyp16: Response time for narrative question will vary across moderate/extremist vs. sunni/shiite condition.			

	Test-Hyp17: Response time for narrative question will vary across control vs. democrat/dictator + moderate/extremist condition.
	Test-Hyp18: Response time for narrative question will vary across control vs. democrat/dictator + sunni/shiite condition.		
	Test-Hyp19: Response time for narrative question will vary across control vs. moderate/extremist + sunni/shiite condition.	

	Test-Hyp20: Response time for narrative question will vary across control vs. triple frame.

Stated-Hyp3: Different frames about the Syrian war will affect support for number of Syrian refugees.

	Test-Hyp21: Support for number of Syrian refugees accepted will vary across control vs. democrat/dictator condition.
	Test-Hyp22: Support for number of Syrian refugees accepted will vary across control vs. moderate/extremist condition.
	Test-Hyp23: Support for number of Syrian refugees accepted will vary across control vs. sunni/shiite condition.

	Test-Hyp24: Support for number of Syrian refugees accepted will vary across democrat/dictator vs. moderate/extremist condition.
	Test-Hyp25: Support for number of Syrian refugees accepted will vary across democrat/dictator vs. sunni/shiite condition.		
	Test-Hyp26: Support for number of Syrian refugees accepted will vary across moderate/extremist vs. sunni/shiite condition.			

	Test-Hyp27: Support for number of Syrian refugees accepted will vary across control vs. democrat/dictator + moderate/extremist condition.
	Test-Hyp28: Support for number of Syrian refugees accepted will vary across control vs. democrat/dictator + sunni/shiite condition.		
	Test-Hyp29: Support for number of Syrian refugees accepted will vary across control vs. moderate/extremist + sunni/shiite condition.	

	Test-Hyp30: Support for number of Syrian refugees accepted will vary across control vs. triple frame.
	
********************************************************************************
NOTES
- The authors planned to test the effectiveness of 7 different frames on the 
outcome (narratives of conflict and number of refugees willing to accept). We 
are assuming they wanted to test the effectiveness of each frame against the 
other and vs. the control. However, there are 3 outcomes x 8 conditions. 
If we test every condition against the other, we will end up with 3 x 19 = 57 
tests. We are testing each condition vs. control (7 tests); and then each of the 
basic three frames against each other (3 tests). This leads us to a total of 30 
tests.

- Outcomes: The authors planned to use structural topic models to analyze 
open-ended responses. We cannot do that analysis because we don't know exactly 
what the hypotheses would be. However, they also include 2 numeric outcomes 
based on these questions that measure "complexity and attentiveness" that we 
use in this analysis. These are: character counts; time spent composing 
responses. (proposal page 2.)

- The average time spent answering open-ended questions is 7.5 hours. This is 
because a good number of people stopped the survey at this point and returned to 
the survey after multiple days (even after excluding those who didn't answer 
this question). We have used the measure as is. 

*/

clear all
use "CorstangeB69.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* TREATMENT
	// see quex for details.

	tab XTESSCORS
	gen treatment = XTESSCORS
	lab def treat 1 "1 control" 2 "2 dem/dict" 3 "3 mod/extremist" 4 "4 sunni/shiite" 5 "5 dem/dict + mod/extrm" 6 "6 dem/dict + sunni/shii" 7 "7 mod/etrm + sunni/shii" 8 "8 triple frame"
	lab val treatment treat
	tab treatment
	
* OUTCOME MEASURES

* character counts in open-ended responses
	browse D01
	gen charac_count = strlen(D01)
	sum charac_count
	
	// exclude refusals
	replace charac_count= . if D01_Refused==-1
	
	sum charac_count
	
* time spent composing responses
	* note: time is saved as a time variable; unit is millisecond. 
	tab tm_start
	tab tm_finish
	
	* hours spent
	gen timespent = (tm_finish -tm_start)/3600000
	sum timespent
	
	* exclude cases that refused to answer this question
	tab D01_Refused, nol
	replace timespent = . if D01_Refused==-1
	sum timespent
	
	// note: the mean is so high because some people took over 10 days to get back to this part in the survey. 
	
* number of refugees willing to accept
	// This year, the United States plans to admit 10,000 refugees.  Overall, do you think the number of refugees allowed into the United States should be increased, decreased, or kept at the current level?
	
	recode D02 (-1 =.r "Refused") (1=5 "expand greatly") (2=4 "expand somewhat") (3=3 "keep at current level") (4=2 "reduce somewhat") (5=1 "reduce greatly"), gen(refugees_increase)
	tab refugees_increase
 	


	
********************************************************************************

* ANALYSIS
	

*	Test-Hyp1: Character counts in responses will vary across control vs. democrat/dictator condition.
	reg charac_count i.treatment if treatment==1 |treatment==2
	// reject. p=.452
	tess 2.treatment, init(CorstangeB69) bonf(3)
	
*	Test-Hyp2: Character counts in responses will vary across control vs. moderate/extremist condition.
	reg charac_count i.treatment if treatment==1 |treatment==3
	// reject. p=.587
	tess 3.treatment, bonf(3)
	
*	Test-Hyp3: Character counts in responses will vary across control vs. sunni/shiite condition.
	reg charac_count i.treatment if treatment==1 |treatment==4
	// reject. p=.923
	tess 4.treatment, bonf(3)
	
*	Test-Hyp4: Character counts in responses will vary across democrat/dictator vs. moderate/extremist condition.
	reg charac_count i.treatment if treatment==2 |treatment==3
	// reject. p=.172
	tess 3.treatment, bonf(3)
	
*	Test-Hyp5: Character counts in responses will vary across democrat/dictator vs. sunni/shiite condition.	
	reg charac_count i.treatment if treatment==2 |treatment==4
	// reject. p=.362
	tess 4.treatment, bonf(3)
	
*	Test-Hyp6: Character counts in responses will vary across moderate/extremist vs. sunni/shiite condition.			
	reg charac_count i.treatment if treatment==3 |treatment==4
	// reject. p=.609
	tess 4.treatment, bonf(3)
	
*	Test-Hyp7: Character counts in responses will vary across control vs. democrat/dictator + moderate/extremist condition.
	reg charac_count i.treatment if treatment==1 |treatment==5
	// reject. p=.205
	tess 5.treatment, bonf(3)
	
*	Test-Hyp8: Character counts in responses will vary across control vs. democrat/dictator + sunni/shiite condition.	
	reg charac_count i.treatment if treatment==1 |treatment==6
	// reject. p=.528
	tess 6.treatment, bonf(3)
	
*	Test-Hyp9: Character counts in responses will vary across control vs. moderate/extremist + sunni/shiite condition.	
	reg charac_count i.treatment if treatment==1 |treatment==7
	// reject. p=.964
	tess 7.treatment, bonf(3)
	
*	Test-Hyp10: Character counts in responses will vary across control vs. triple frame.		
	reg charac_count i.treatment if treatment==1 |treatment==8
	// reject. p=.661	
	tess 8.treatment, bonf(3)
	
	
*	Test-Hyp11: Response time for narrative question will vary across control vs. democrat/dictator condition.
	reg timespent i.treatment if treatment==1 |treatment==2
	// reject. p=.808
	tess 2.treatment, bonf(3)
	
*	Test-Hyp12: Response time for narrative question will vary across control vs. moderate/extremist condition.
	reg timespent i.treatment if treatment==1 |treatment==3
	// reject. p=.945
	tess 3.treatment, bonf(3)
	
*	Test-Hyp13: Response time for narrative question will vary across control vs. sunni/shiite condition.
	reg timespent i.treatment if treatment==1 |treatment==4
	// reject. p=.386
	tess 4.treatment, bonf(3)

*	Test-Hyp14: Response time for narrative question will vary across democrat/dictator vs. moderate/extremist condition.
	reg timespent i.treatment if treatment==2 |treatment==3
	// reject. p=.892
	tess 3.treatment, bonf(3)
	
*	Test-Hyp15: Response time for narrative question will vary across democrat/dictator vs. sunni/shiite condition.		
	reg timespent i.treatment if treatment==2 |treatment==4
	// reject. p=.275
	tess 4.treatment, bonf(3)
	
*	Test-Hyp16: Response time for narrative question will vary across moderate/extremist vs. sunni/shiite condition.			
	reg timespent i.treatment if treatment==3 |treatment==4
	// reject. p=.404
	tess 4.treatment, bonf(3)
	
*	Test-Hyp17: Response time for narrative question will vary across control vs. democrat/dictator + moderate/extremist condition.
	reg timespent i.treatment if treatment==1 |treatment==5
	// reject. p=.540
	tess 5.treatment, bonf(3)
	
*	Test-Hyp18: Response time for narrative question will vary across control vs. democrat/dictator + sunni/shiite condition.	
	reg timespent i.treatment if treatment==1 |treatment==6
	// reject. p=.812
	tess 6.treatment, bonf(3)
	
*	Test-Hyp19: Response time for narrative question will vary across control vs. moderate/extremist + sunni/shiite condition.	
	reg timespent i.treatment if treatment==1 |treatment==7
	// reject. p=.483
	tess 7.treatment, bonf(3)
	
*	Test-Hyp20: Response time for narrative question will vary across control vs. triple frame.
	reg timespent i.treatment if treatment==1 |treatment==8
	// reject. p=.488	
	tess 8.treatment, bonf(3)

*	Test-Hyp21: Support for number of Syrian refugees accepted will vary across control vs. democrat/dictator condition.
	reg refugees_increase i.treatment if treatment==1 |treatment==2
	// reject. p=.988
	tess 2.treatment, bonf(3)
	
*	Test-Hyp22: Support for number of Syrian refugees accepted will vary across control vs. moderate/extremist condition.
	reg refugees_increase i.treatment if treatment==1 |treatment==3
	// reject. p=.344
	tess 3.treatment, bonf(3)
	
*	Test-Hyp23: Support for number of Syrian refugees accepted will vary across control vs. sunni/shiite condition.
	reg refugees_increase i.treatment if treatment==1 |treatment==4
	// reject. p=.419	
	tess 4.treatment, bonf(3)
	
*	Test-Hyp24: Support for number of Syrian refugees accepted will vary across democrat/dictator vs. moderate/extremist condition.
	reg refugees_increase i.treatment if treatment==2 |treatment==3
	// reject. p=.342	
	tess 3.treatment, bonf(3)
	
*	Test-Hyp25: Support for number of Syrian refugees accepted will vary across democrat/dictator vs. sunni/shiite condition.		
	reg refugees_increase i.treatment if treatment==2 |treatment==4
	// reject. p=.416	
	tess 4.treatment, bonf(3)
	
*	Test-Hyp26: Support for number of Syrian refugees accepted will vary across moderate/extremist vs. sunni/shiite condition.
	reg refugees_increase i.treatment if treatment==3 |treatment==4
	// reject. p=.918	
	tess 4.treatment, bonf(3)			

*	Test-Hyp27: Support for number of Syrian refugees accepted will vary across control vs. democrat/dictator + moderate/extremist condition.
	reg refugees_increase i.treatment if treatment==1 |treatment==5
	// reject. p=.233	
	tess 5.treatment, bonf(3)
	
*	Test-Hyp28: Support for number of Syrian refugees accepted will vary across control vs. democrat/dictator + sunni/shiite condition.	
	reg refugees_increase i.treatment if treatment==1 |treatment==6
	// reject. p=.817
	tess 6.treatment, bonf(3)
	
*	Test-Hyp29: Support for number of Syrian refugees accepted will vary across control vs. moderate/extremist + sunni/shiite condition.	
	reg refugees_increase i.treatment if treatment==1 |treatment==7
	// reject. p=.454	
	tess 7.treatment, bonf(3)
	
*	Test-Hyp30: Support for number of Syrian refugees accepted will vary across control vs. triple frame.
	reg refugees_increase i.treatment if treatment==1 |treatment==8
	// reject. p=.734	
	tess 8.treatment, bonf(3)
